package com.chinatelecom.ifree.business.dao.jifen.impl;

import java.sql.PreparedStatement;
import java.sql.ResultSet;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.chinatelecom.ifree.business.dao.jifen.IBonusChangeLogDao;
import com.chinatelecom.ifree.business.dao.order.impl.BaseDaoSupport;
import com.chinatelecom.ifree.business.domain.jifen.BonusChangeLog;
@Repository
public class BonusChangeLogDaoImpl extends BaseDaoSupport<BonusChangeLog> implements IBonusChangeLogDao {
	
	private static transient Logger logger = LoggerFactory.getLogger(BonusChangeLogDaoImpl.class) ;


	@Override
	public void save(BonusChangeLog bonusChangeLog) throws Exception {
		sql = "INSERT INTO bonus_action(name,description,status,maxTimesPerDay,bonus_calc_type , bonus_default_type,bonus_change_type,validation_code,uptime) VALUES(?,?,?,?,?,?,?,?,now())";
		
		super.saveEntity(bonusChangeLog);
	}

	

	@Override
	public BonusChangeLog executeSingleResultSet(ResultSet rs) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}


	@Override
	public void executeSql(PreparedStatement statement, BonusChangeLog t)
			throws Exception {
//		statement.setString(1, t.getName());
//		statement.setString(2, t.getDescription());
//		statement.setBoolean(3, t.isStatus());
//		statement.setInt(4, t.getMaxTimesPerDay());
//		statement.setInt(5, t.getBonusCalcType());
//		statement.setInt(6, t.getBonusDefaultValue());
//		statement.setInt(7, t.getBonusChangeType());
//		statement.setString(8, t.getValidationCode());
	}


	@Override
	public void executeBatchSql(PreparedStatement state, BonusChangeLog[] t)
			throws Exception {
		// TODO Auto-generated method stub
		
	}


	
}
